#!/bin/bash

CON="1 8 32"
COMBINATIONS=("1024/1024")

mkdir -p log
mkdir -p data

SYS_TIME=$(date "+%Y%m%d_%H%M%S")
LOG="log/temp_${SYS_TIME}"
tokenizer_path=/home/models/DeepSeek-R1-Distill-Qwen-32B

for combo in "${COMBINATIONS[@]}"; do
    IFS="/" read -r isl osl <<< "$combo"
    for con in $CON; do
        p_con=$(($con * 2))
        p_con=$(($p_con < 3 ? 3 : $p_con))
        prompts=0
        echo "[RUNNING] prompts $prompts isl $isl osl $osl con $con"
        python3 bench_serving.py \
        --backend vllm \
        --tokenizer $tokenizer_path \
        --host 0.0.0.0 \
        --port 8000 \
        --dataset-name generated-shared-prefix \
        --gsp-system-prompt-len 0 \
        --gsp-question-len $isl \
        --gsp-output-len $osl \
        --gsp-num-groups 1 \
        --gsp-prompts-per-group $p_con\
        --random-range-ratio 1 \
        --num-prompt $prompts \
        --random-input $isl \
        --random-output $osl \
        --max-concurrency $con \
		2>&1 | tee -a ${LOG}.log
   done
done